package com.itheima.exerciseTest.test10_19;

public class Test12 {
    public static void main(String[] args) {
        AA a = new AA();
        a.methodA(new InterA() {
            @Override
            public void showA() {
                System.out.println("匿名内部类");
            }
        });
        a.methodA(() -> {
            System.out.println("Lambda函数编程思想");
        });
    }
}
//定义接口
interface InterA {
    void showA();
}

class AA {

    public void methodA(InterA a) {
        a.showA();
    }
}

